import { createRouter, createWebHistory } from 'vue-router'

import ClazzIndex from '@/views/clazz/index.vue'
import dept from '@/views/dept/index.vue'
import EmpIndex from '@/views/emp/index.vue'
import IndexIndex from '@/views/index/index.vue'
import LogIndex from '@/views/log/index.vue'
import LoginIndex from '@/views/login/index.vue'
import StuIndex from '@/views/stu/index.vue'
import EmpReportIndex from '@/views/report/emp/index.vue'
import StuReportIndex from '@/views/report/stu/index.vue'
import Layout from "@/views/layout/index.vue";


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {path: '/',
     name: '',
     component: Layout,
     redirect:'/index',
     children:[
        {path: '/index',name: 'index',component: IndexIndex},
        {path: '/clazz',name: 'clazz',component: ClazzIndex},
        {path: '/stu',name: 'stu',component: StuIndex},
        {path: '/dept',name: 'dept',component: dept},
        {path: '/emp',name: 'emp',component: EmpIndex},
        {path: '/empReport',name: 'empReport',component: EmpReportIndex},
        {path: '/stuReport',name: 'stuReport',component: StuReportIndex},
        {path: '/log',name: 'log',component: LogIndex}
    ]},
    {path: '/login',name: 'login',component: LoginIndex},
  ]
})

export default router
